/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.playground.core.repository;

import com.playground.core.entity.GameTitle;
import com.playground.core.entity.Queue;
import java.util.List;

/**
 *
 * @author Tiago Peres
 */
public interface QueueRepository {    
    /**
     * Saves a queue, if it doesn't exist creates it.
     * 
     * @param queue the queue to be saved
     * @return the recently saved queue
     * existed
     */
    public Queue save(Queue queue);
    
    /**
     * Returns the queue corresponding to the given gameTitle.
     * 
     * @param gameTitle the queue's gameTitle
     * @return the queue with the given gameTitle or null if there's no such
     * queue
     */
    public Queue getQueueByGameTitle(GameTitle gameTitle);
    
    /**
     * @return all the queues
     */
    public List<Queue> findAll();
    
    /**
     * Removes all queues
     */
    void deleteAll();
}
